from django.http import HttpResponse
from django.shortcuts import redirect, reverse


def login(request):
    url = reverse('index')
    return redirect(url)


def index(request):
    return HttpResponse('第一个Django项目')


def detail(request, ID, year, mouth):
    return HttpResponse('%s年%s月的学生的id为%s' % (year, mouth, ID))


def student(request, ID, year, mouth):
    return HttpResponse('{}年{}月的学生的id为{}'.format(year, mouth, ID))

def mingzi(request, name):
    return HttpResponse('{}是1班的'.format(name))
